/*  1:   */ package org.jetbrains.generate.tostring.velocity;
/*  2:   */ 
/*  3:   */

import org.apache.commons.collections.ExtendedProperties;
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.runtime.log.SimpleLog4JLogSystem;

/*  4:   */
/*  5:   */
/*  6:   */ 
/*  7:   */ public class VelocityFactory
/*  8:   */ {
/*  9:   */   private static VelocityEngine a;
/* 10:   */   
/* 11:   */   public static VelocityEngine newVeloictyEngine()
/* 12:   */     throws Exception
/* 13:   */   {
/* 14:46 */     ExtendedProperties localExtendedProperties = new ExtendedProperties();
/* 15:47 */     localExtendedProperties.addProperty("runtime.log.logsystem.class", SimpleLog4JLogSystem.class.getName());
/* 16:48 */     localExtendedProperties.addProperty("runtime.log.logsystem.log4j.category", "GenerateToString");
/* 17:49 */     VelocityEngine localVelocityEngine = new VelocityEngine();
/* 18:50 */     localVelocityEngine.setExtendedProperties(localExtendedProperties);
/* 19:51 */     localVelocityEngine.init();
/* 20:52 */     return localVelocityEngine;
/* 21:   */   }
/* 22:   */   
/* 23:   */   public static VelocityEngine getVelocityEngine()
/* 24:   */     throws Exception
/* 25:   */   {
/* 26:63 */     if (a == null) {
/* 27:64 */       a = newVeloictyEngine();
/* 28:   */     }
/* 29:67 */     return a;
/* 30:   */   }
/* 31:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.generate.tostring.velocity.VelocityFactory

 * JD-Core Version:    0.7.0.1

 */